package putao.blocksgame.viewobject
{
	import flash.display.Sprite;
	import flash.geom.Point;
	
	import putao.blocksgame.BMath;
	
	public class NonmotileItem extends Sprite
	{
		/**
		 * 元件所在的列 
		 */		
		public var col:int = 0;
		
		/**
		 * 元件所在的行 
		 */		
		public var row:int = 0;
		
		public function NonmotileItem()
		{
			super();
		}
		
		/**
		 *
		 * 根据输入的行列坐标设置元件的x，y坐标
		 *  
		 * @param col
		 * @param row
		 * 
		 */		
		public function setXYByCoord(col:int, row:int):void
		{
			this.col = col;
			this.row = row;
			var p:Point = BMath.getCenterByCoord(col, row);
			this.x = p.x;
			this.y = p.y;
		}
	}
}